import request from '@/utils/request'

export function fetchList(query) {
  return request({
    url: '/api/appSystem/list',
    method: 'get',
    params: query
  })
}

export function fetchTypeList(query) {
  return request({
    url: '/api/appType/allList',
    method: 'get',
    params: query
  })
}

export function fetchSystemType(query) {
  return request({
    url: '/api/appSystem/types',
    method: 'get',
    params: query
  })
}

export function fetchHostList(query) {
  return request({
    url: '/api/host/allList',
    method: 'get',
    params: query
  })
}

export function fetchPortList(query) {
  return request({
    url: '/api/databasePort/allList',
    method: 'get',
    params: query
  })
}

export function fetchRedisList(query) {
  return request({
    url: '/api/redis/allList',
    method: 'get',
    params: query
  })
}

export function fetchDevList(query) {
  return request({
    url: '/api/appSystem/devList',
    method: 'get',
    params: query
  })
}

export function create(data) {
  return request({
    url: '/api/appSystem/insert',
    method: 'post',
    data
  })
}

export function update(data) {
  return request({
    url: '/api/appSystem/update',
    method: 'put',
    data
  })
}

export function del(data) {
  return request({
    url: '/api/appSystem/delete',
    method: 'delete',
    data
  })
}
